package omg.ligong.db;

import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.Date;
import java.sql.ParameterMetaData;
import java.sql.PreparedStatement;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;

public class PooledPreparedStatement implements PreparedStatement {
	private Connection conn;
	private PreparedStatement pstmt;

	public PooledPreparedStatement(PooledConnection conn, PreparedStatement pstmt) {
		this.conn = conn;
		this.pstmt = pstmt;
	}

	public void addBatch() throws SQLException {
		pstmt.addBatch();
	}

	public void clearParameters() throws SQLException {
		pstmt.clearParameters();
	}

	public boolean execute() throws SQLException {
		return pstmt.execute();
	}

	public ResultSet executeQuery() throws SQLException {
		return pstmt.executeQuery();
	}

	public int executeUpdate() throws SQLException {
		return pstmt.executeUpdate();
	}

	public ResultSetMetaData getMetaData() throws SQLException {
		return pstmt.getMetaData();
	}

	public ParameterMetaData getParameterMetaData() throws SQLException {
		return pstmt.getParameterMetaData();
	}

	public void setArray(int i, Array x) throws SQLException {
		pstmt.setArray(i, x);
	}

	public void setAsciiStream(int parameterIndex, InputStream x, int length)
			throws SQLException {
		pstmt.setAsciiStream(parameterIndex, x, length);
	}

	public void setBigDecimal(int parameterIndex, BigDecimal x)
			throws SQLException {
		pstmt.setBigDecimal(parameterIndex, x);
	}

	public void setBinaryStream(int parameterIndex, InputStream x, int length)
			throws SQLException {
		pstmt.setBinaryStream(parameterIndex, x, length);
	}

	public void setBlob(int i, Blob x) throws SQLException {
		pstmt.setBlob(i, x);
	}

	public void setBoolean(int parameterIndex, boolean x) throws SQLException {
		pstmt.setBoolean(parameterIndex, x);
	}

	public void setByte(int parameterIndex, byte x) throws SQLException {
		pstmt.setByte(parameterIndex, x);
	}

	public void setBytes(int parameterIndex, byte[] x) throws SQLException {
		pstmt.setBytes(parameterIndex, x);
	}

	public void setCharacterStream(int parameterIndex, Reader reader, int length)
			throws SQLException {
		pstmt.setCharacterStream(parameterIndex, reader, length);
	}

	public void setClob(int i, Clob x) throws SQLException {
		pstmt.setClob(i, x);
	}

	public void setDate(int parameterIndex, Date x) throws SQLException {
		pstmt.setDate(parameterIndex, x);
	}

	public void setDate(int parameterIndex, Date x, Calendar cal)
			throws SQLException {
		pstmt.setDate(parameterIndex, x, cal);
	}

	public void setDouble(int parameterIndex, double x) throws SQLException {
		pstmt.setDouble(parameterIndex, x);
	}

	public void setFloat(int parameterIndex, float x) throws SQLException {
		pstmt.setFloat(parameterIndex, x);
	}

	public void setInt(int parameterIndex, int x) throws SQLException {
		pstmt.setInt(parameterIndex, x);
	}

	public void setLong(int parameterIndex, long x) throws SQLException {
		pstmt.setLong(parameterIndex, x);
	}

	public void setNull(int parameterIndex, int sqlType) throws SQLException {
		pstmt.setNull(parameterIndex, sqlType);
	}

	public void setNull(int paramIndex, int sqlType, String typeName)
			throws SQLException {
		pstmt.setNull(paramIndex, sqlType, typeName);
	}

	public void setObject(int parameterIndex, Object x) throws SQLException {
		pstmt.setObject(parameterIndex, x);
	}

	public void setObject(int parameterIndex, Object x, int targetSqlType)
			throws SQLException {
		pstmt.setObject(parameterIndex, x, targetSqlType);
	}

	public void setObject(int parameterIndex, Object x, int targetSqlType,
			int scale) throws SQLException {
		pstmt.setObject(parameterIndex, x, targetSqlType, scale);
	}

	public void setRef(int i, Ref x) throws SQLException {
		pstmt.setRef(i, x);
	}

	public void setShort(int parameterIndex, short x) throws SQLException {
		pstmt.setShort(parameterIndex, x);
	}

	public void setString(int parameterIndex, String x) throws SQLException {
		pstmt.setString(parameterIndex, x);
	}

	public void setTime(int parameterIndex, Time x) throws SQLException {
		pstmt.setTime(parameterIndex, x);
	}

	public void setTime(int parameterIndex, Time x, Calendar cal)
			throws SQLException {
		pstmt.setTime(parameterIndex, x, cal);
	}

	public void setTimestamp(int parameterIndex, Timestamp x)
			throws SQLException {
		pstmt.setTimestamp(parameterIndex, x);
	}

	public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
			throws SQLException {
		pstmt.setTimestamp(parameterIndex, x, cal);
	}

	public void setURL(int parameterIndex, URL x) throws SQLException {
		pstmt.setURL(parameterIndex, x);
	}

	public void setUnicodeStream(int parameterIndex, InputStream x, int length)
			throws SQLException {
		pstmt.setUnicodeStream(parameterIndex, x, length);
	}

	public void addBatch(String sql) throws SQLException {
		pstmt.addBatch(sql);
	}

	public void cancel() throws SQLException {
		pstmt.cancel();
	}

	public void clearBatch() throws SQLException {
		pstmt.clearBatch();
	}

	public void clearWarnings() throws SQLException {
		pstmt.clearWarnings();
	}

	public void close() throws SQLException {
		pstmt.close();
	}

	public boolean execute(String sql) throws SQLException {
		return pstmt.execute(sql);
	}

	public boolean execute(String sql, int autoGeneratedKeys)
			throws SQLException {
		return pstmt.execute(sql, autoGeneratedKeys);
	}

	public boolean execute(String sql, int[] columnIndexes) throws SQLException {
		return pstmt.execute(sql, columnIndexes);
	}

	public boolean execute(String sql, String[] columnNames)
			throws SQLException {
		return pstmt.execute(sql, columnNames);
	}

	public int[] executeBatch() throws SQLException {
		return pstmt.executeBatch();
	}

	public ResultSet executeQuery(String sql) throws SQLException {
		return pstmt.executeQuery(sql);
	}

	public int executeUpdate(String sql) throws SQLException {
		return pstmt.executeUpdate(sql);
	}

	public int executeUpdate(String sql, int autoGeneratedKeys)
			throws SQLException {
		return pstmt.executeUpdate(sql, autoGeneratedKeys);
	}

	public int executeUpdate(String sql, int[] columnIndexes)
			throws SQLException {
		return pstmt.executeUpdate(sql, columnIndexes);
	}

	public int executeUpdate(String sql, String[] columnNames)
			throws SQLException {
		return pstmt.executeUpdate(sql, columnNames);
	}

	public Connection getConnection() throws SQLException {
		return this.conn;
	}

	public int getFetchDirection() throws SQLException {
		return pstmt.getFetchDirection();
	}

	public int getFetchSize() throws SQLException {
		return pstmt.getFetchSize();
	}

	public ResultSet getGeneratedKeys() throws SQLException {
		return pstmt.getGeneratedKeys();
	}

	public int getMaxFieldSize() throws SQLException {
		return pstmt.getMaxFieldSize();
	}

	public int getMaxRows() throws SQLException {
		return pstmt.getMaxRows();
	}

	public boolean getMoreResults() throws SQLException {
		return pstmt.getMoreResults();
	}

	public boolean getMoreResults(int current) throws SQLException {
		return pstmt.getMoreResults(current);
	}

	public int getQueryTimeout() throws SQLException {
		return pstmt.getQueryTimeout();
	}

	public ResultSet getResultSet() throws SQLException {
		return pstmt.getResultSet();
	}

	public int getResultSetConcurrency() throws SQLException {
		return pstmt.getResultSetConcurrency();
	}

	public int getResultSetHoldability() throws SQLException {
		return pstmt.getResultSetHoldability();
	}

	public int getResultSetType() throws SQLException {
		return pstmt.getResultSetType();
	}

	public int getUpdateCount() throws SQLException {
		return pstmt.getUpdateCount();
	}

	public SQLWarning getWarnings() throws SQLException {
		return pstmt.getWarnings();
	}

	public void setCursorName(String name) throws SQLException {
		pstmt.setCursorName(name);
	}

	public void setEscapeProcessing(boolean enable) throws SQLException {
		pstmt.setEscapeProcessing(enable);
	}

	public void setFetchDirection(int direction) throws SQLException {
		pstmt.setFetchDirection(direction);
	}

	public void setFetchSize(int rows) throws SQLException {
		pstmt.setFetchSize(rows);
	}

	public void setMaxFieldSize(int max) throws SQLException {
		pstmt.setMaxFieldSize(max);
	}

	public void setMaxRows(int max) throws SQLException {
		pstmt.setMaxRows(max);
	}

	public void setQueryTimeout(int seconds) throws SQLException {
		pstmt.setQueryTimeout(seconds);
	}

}
